﻿using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UDIAdapter.Data;
using UDIAdapter.Services;

namespace UDIAdapter.Pages
{
    public partial class Settings
    {

        private SerialPortModel serialPortModel;

        [Inject]
        public BarcodeService barcodeService { get; set; }

        //public SerialPort SerialPort;
        [Inject]
        public ILogger<Settings> Logger { get; set; }

        public Settings()
        {
            serialPortModel = new SerialPortModel();
        }

        private void HandleValidSubmit()
        {
            Logger.LogInformation("设置串口名字.");

            barcodeService.SerialPort.PortName = serialPortModel.PortName;

            

        }



    }
}
